# $Id: PKGBUILD 90059 2013-05-06 19:38:20Z foutrelis $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Larry Hajali <larryhaja [at] gmail [dot] com>

pkgname=megaglest
pkgver=3.7.1
pkgrel=2
pkgdesc="Fork of Glest, a 3D real-time strategy game in a fantastic world."
arch=('i686' 'x86_64')
url="http://sourceforge.net/projects/megaglest/"
license=('GPL3')
depends=('curl' 'megaglest-data' 'xerces-c' 'sdl' 'libvorbis' 'openal' 'libgl' 'lua51' 'icu' 'ftgl' 'glew'
'libircclient' 'miniupnpc' 'wxgtk' 'glu')
makedepends=('ftjam' 'cmake' 'mesa')
source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-source-${pkgver}.tar.xz"
        lol.patch)
md5sums=('e7a960ec73784aa0f7b951d2ad963456'
         '68fd326b73ed1c75981004fbdef6b73a')

build() {
  cd "${srcdir}"/"${pkgname}"-"${pkgver}"/

  #patch -Np1 < "$srcdir/lol.patch"

  [[ -d build ]] && rm -r build
  mkdir build && cd build
  cmake .. \
    -DWANT_SVN_STAMP=OFF \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release # set =Debug for debugging version
  make
}

package() {
  cd "${srcdir}"/"${pkgname}"-"${pkgver}"/

  cd build
  make DESTDIR="$pkgdir" install
}

# vim: sw=2:ts=2 et:
